package cn.wqk.rrtf.mapper;

import cn.wqk.rrtf.pojo.Course;
import cn.wqk.rrtf.pojo.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import javax.swing.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther:
 * @Date: 2020/07/13/13:24
 * @Description: 老师表的增删改查
 */
@Mapper
@Repository
public interface TeacherMapper {
    /**
     * 新增老师
     * @return
     */
    int insertTeacher(Teacher teacher);
    /**
     * 删除老师
     * @param teacherId
     * @return
     */
    int deleteTeacher(Integer teacherId);
    /**
     * 删除所有老师
     * @return
     */
    int deleteAllTeacher();

    /**
     * 根据条件查询：指定老师
     * @return
     */
    List<Teacher> selectTeacher(Teacher teacher);

    /**
     * 查询所有老师
     * @return
     */
    List<Teacher> selectAllTeacher();

    /**
     * 根据课程ID查询老师信息
     * @return
     */
    Teacher selectTeacherByCourseId(Integer courseId);

    /**
     * 修改指定老师信息
     */
    int updateTeacher(Teacher teacher);
}

